package application;


import java.io.IOException;

import middlware.InterfaceDescripition;


public class Servidor implements InterfaceDescripition{
	
	public Servidor() throws IOException, ClassNotFoundException {
	}
	
	public int soma(int...vetor) throws IOException, ClassNotFoundException,InterruptedException {
        int soma = 0;
		for(int i=0;i< vetor.length;i++){
			soma += vetor[i];
		}
		
		return soma;
	}

	public int subtracao(int...vetor) throws IOException,ClassNotFoundException, InterruptedException {
        int sub = vetor[0];
		for(int i=1;i< vetor.length;i++){
			sub -= vetor[i];
		}
		
		return sub;
	}
	
}
